<nz-input-group [nzSuffix]="suffixTemplate" style="width: 100%">
  <input
    #inputElement
    [type]="passwordVisible ? 'text' : 'password'"
    nz-input
    [placeholder]="placeholder"
    (ngModelChange)="onChange($event)"
    [(ngModel)]="value"
  />
</nz-input-group>
<ng-template #suffixTemplate>
  <i nz-icon [nzType]="passwordVisible ? 'eye-invisible' : 'eye'" (click)="passwordVisible = !passwordVisible"></i>
</ng-template>
